package com.system.vote.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.system.vote.common.utils.CustomDateTimeSerializer;
import lombok.Data;

/**
 * 投票详情
 * @TableName t_vote_detail
 */
@TableName(value ="t_vote_detail")
@Data
public class TVoteDetail implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 投票ID
     */
    @TableField(value = "vote_id")
    private Long voteId;

    /**
     * 投票选项ID
     */
    @TableField(value = "vote_item_id")
    private Long voteItemId;

    /**
     * 投票时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "vote_date")
    private Date voteDate;

    /**
     * 使用人微信ID
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 使用人ID
     */
    @TableField(value = "w_uid")
    private Long wUid;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}